<div class="details">
  <div class="main_top">
    <h2>薪资详情</h2>
  </div>
  <%= render "staff_info" %>

  <%= form_for @staff, url: "#", method: :get, html: {id: 'staff_form'} do |form| %>

    <div class="details_content staff_setting">

      <div class="wrap">

        <div class="salary">
          <span class="width-60">薪资设置</span>

          <ul>
            <li>
              <%= form.label :basic_salary, "底薪" %>
              <%= form.text_field :basic_salary%>
            </li>

            <li class="text-align-right" style="margin-left:75px;">
              <input type="button" value="调薪" class="adjust_salary_btn">
            </li>
          </ul>
        </div>

        <div class="allowance">

          <span class="width-60">福利补贴</span>

          <ul style="margin-left:10px;">
            <%= form.fields_for :subsidy do |subsidy_fields| -%>
              <li>
                <%= subsidy_fields.label :gangwei, "岗位补贴" %>
                <%= subsidy_fields.text_field :gangwei, value: @staff.gangwei%>
              </li>
              <li>
                <%= subsidy_fields.label :zhusu, "住宿补贴" %>
                <%= subsidy_fields.text_field :zhusu, value: @staff.zhusu %>
              </li>
              <li>
                <%= subsidy_fields.label :canfei, "餐费补贴" %>
                <%= subsidy_fields.text_field :canfei, value: @staff.canfei %>
              </li>
              <li>
                <%= subsidy_fields.label :laobao, "劳保补贴" %>
                <%= subsidy_fields.text_field :laobao, value: @staff.laobao %>
              </li>
              <li>
                <%= subsidy_fields.label :gaowen, "高温补贴" %>
                <%= subsidy_fields.text_field :gaowen, value: @staff.gaowen %>
              </li>
              <li>
                <%= subsidy_fields.label :other, "其他补贴" %>
                <%= subsidy_fields.text_field :other, value: @staff.other_subsidy %>
              </li>
            <% end %>
          </ul>

        </div>

        <div class="ticheng">
          <!-- <%= form.label :commission, "试用期结束有提成" %> -->
          提成设置: <%= form.text_field :commission%>%
        </div>

          <!-- <%= link_to "编辑", '#', class: "btn btn-crud position" %> -->
      </div>

      <div class="wrap">
        <div class="social_security" style="margin-top:120px;">
          <label for="security" class="width-60">保险金</label>

          <ul>
            <%= form.fields_for :insurance do |insurance_fields| %>
              <li>
                <%= insurance_fields.label :yiliao, "医保费",  class: "width-84" %>
                <%= insurance_fields.text_field :yiliao, value: @staff.yiliao %>
              </li>
              <li>
                <%= insurance_fields.label :yanglao, "养老险",  class: "width-84" %>
                <%= insurance_fields.text_field :yanglao, value: @staff.yanglao %>
              </li>
              <li>
                <%= insurance_fields.label :shiye, "失业险" %>
                <%= insurance_fields.text_field :shiye, value: @staff.shiye %>
              </li>
              <li>
                <%= insurance_fields.label :gongjijin, "公积金" %>
                <%= insurance_fields.text_field :gongjijin, value: @staff.gongjijin %>
              </li>
            <% end %>
          </ul>
        </div>
        <div class="btn_group" style="margin-top:90px;margin-left:250px;">
          <%= link_to '返回', ems_store_staff_salaries_path, class: 'btn edit_btn' %>
          <%= link_to "编辑", edit_ems_store_staff_salary_path(@salary.id), class: 'btn edit_btn' %>
        </div>
      </div>



    </div>

  <% end %>

</div>

<%= content_for :pre_assets do %>
<script type="text/javascript" charset="utf-8">
  $(document).ready(function(){
    $("input").attr("disabled", "disabled");
    $(".edit_btn").attr("disabled", false);
  })
</script>
<% end %>
